package main;

import com.gargoylesoftware.htmlunit.html.DomText;
import com.gargoylesoftware.htmlunit.html.HtmlTableDataCell;
import com.gargoylesoftware.htmlunit.html.HtmlTableRow;

public class CourseOffered {

	private String name;
	private String level;
	private String duration;
	
	public CourseOffered(HtmlTableRow htmlTableRow) {
		
	DomText	nametext = (DomText) htmlTableRow.getCells().get(0).getFirstChild();
	DomText	levelText = (DomText) htmlTableRow.getCells().get(1).getFirstChild();
	DomText	durationText = (DomText) htmlTableRow.getCells().get(2).getFirstChild();
	
	this.name = nametext.getData();
	this.level = levelText.getData();
	this.duration = durationText.getData();
		
	}
	
	public CourseOffered()
	{
		this.duration = "";
		this.name = "";
		this.level= "";
	}

	public String getName() {
		return name;
	}

	public String getLevel() {
		return level;
	}

	public String getDuration() {
		return duration;
	}

	public static CourseOffered getNoCourses()
	{
		return  new CourseOffered();
		
	}
}
